import {NgModule}             from '@angular/core';
import {RouterModule, Routes} from '@angular/router';

import {ArticleComponent} from "./article/article.component";
import {ArticleEditorComponent} from "./article/childComponents/articleEditor.component"
import {ArticleDetailComponent} from "./article/childComponents/articleDetail.component"
import {ArticleUploadComponent} from "./article/childComponents/articleUpload.component"

const routes: Routes = [
    {path: '', redirectTo: '/article', pathMatch: 'full'},
    {path: 'article', component: ArticleComponent},
    {path: 'articleDetail/:id', component: ArticleDetailComponent},
    {path: 'articleUpload', component: ArticleUploadComponent},
    { path: '**', component: ArticleComponent }
];
@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})
export class AppRoutingModule {
}
